package topcoder.srm591;

public class TheArithmeticProgression {
	public double minimumChange(int a, int b, int c) {
		double r = 0;
		int r1 = b - a;
		int r2 = c - b;

		if (r1 == r2)
			return 0.0;

		r = Math.abs(((a + c) / 2.0) - b);

		return r;

	}

	public static void main(String[] args) {
		TheArithmeticProgression tap = new TheArithmeticProgression();
		System.out.println(tap.minimumChange(10, 90, 100));
	}

}
